import request from '@/utils/request'

export function pageCategory(data) {
  return request({
    url: '/category/page',
    method: 'post',
    data
  })
}
export function getCategory(id) {
  return request({
    url: `/category/get/${id}`,
    method: 'get',
  })
}
export function deleteCategory(id) {
  return request({
    url: `/category/delete/${id}`,
    method: 'delete',
  })
}
export function saveCategory(data) {
  return request({
    url: '/category/save',
    method: 'put',
    data
  })
}
export function editCategory(data) {
  return request({
    url: '/category/edit',
    method: 'post',
    data
  })
}
export function listCategory() {
  return request({
    url: '/category/list',
    method: 'get',
  })
}
